<template>
	<view class="my-search-container" :style="{backgroundColor: bgcolor}" @click="gotoSearchs">
		<view class="my-search-box" :style="{borderRadius: radius+ 'px'}">
			<uni-icons type="search" size="18"></uni-icons>
			<text class="my-search-text">搜素</text>
		</view>
	</view>
</template>

<script>
	export default {
		name:"my-search",
		data() {
			return {
				
			};
		},
		props: {
			// 背景色
			bgcolor: {
				type: String,
				default: '#c00000'
			},
			radius: {
				type: Number,
				default: 18
			}
		},
		methods: {
			gotoSearchs() {
				this.$emit('click')
				// console.log('子组件')
			}
		}
	}
</script>

<style lang="scss">
.my-search-container {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 50px;
	// background-color: #c00000;
	padding: 0 10px;
	.my-search-box {
		display: flex;
		justify-content: center;
		align-items: center;
		height: 36px;
		width: 100%;
		// border-radius: 18px;
		background-color: #fff;
		.my-search-text {
			margin-left: 6px;
		}
	}
}
</style>